<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<br><br>
<div class="searchresult"><i>${result}</i></div>
<br><br>
<s:form action="DeleteProduct">
<s:hidden name="manuid" value="%{provider.id}"/>
<table border="1" cellpadding="0" cellspacing="0"> 
	<tr height="30">
		<th width="25" align="center"><input type="checkbox" id="IdAllCheck" onclick="tongleall()"/></th>
		<th width="35" align="center">ID</th>
		<th width="160" align="center"> Name</th>
		<th width="160" align="center"> Price</th>
		<th width="160" align="center"> Quantity</th>
		<th width="260" align="center"> Product Description</th>
		<th width="100" align="center"> Controls</th>
	</tr>
	<s:iterator value="ProductResult" status="status"> 
		<tr class="<s:if test="#status.even">even</s:if><s:else>odd</s:else>">
			<td width="25" align="center"><input type="checkbox" name="IdCheck" value="${productID}" onclick="synccheck()"/></td>
			<td width="35" align="left"> <s:property value="productID"/></td>
			<td width="160" align="left"> <s:property value="name" /></td>
			<td width="160" align="left"> <s:property value="price" /> </td>
			<td width="160" align="left"> <s:property value="quantity" /> </td>
			<td width="260" align="left"> <s:property value="des" /> </td>
			<td width="100" align="center">
				<s:url var="editproduct" value="EditProduct">
					<s:param name="SelectedProductId" value="productID"></s:param>
					<s:param name="returntosearch" value="true"></s:param>
				</s:url>
				<s:a href="%{editproduct}">Edit</s:a>
			</td>
		</tr>
	</s:iterator>
</table>
<table class="underbutton">
	<tr >
	<td><input type="button" value="Delete" class="deletebutton"/></td>
	<s:if test="%{#request.noreturn=='true'}"></s:if>
	<s:else><td><input type="button" value="Return" onclick="window.location='/kita/returnproduct.action?SelectedManuId=${provider.id}'"></td></s:else>
	</tr>
</table>
</s:form>